﻿using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;

namespace RESTClient
{
    public static class CertificateUtility
    {
        public static void SetCertificatePolicy()
        {
            ServicePointManager.ServerCertificateValidationCallback += ValidateAllCerts;
        }

        private static bool ValidateAllCerts(object sender, X509Certificate cert, X509Chain chain, 
                                            SslPolicyErrors error)
        {
            return true;
        }
    }
}
